package com.zhaojindong.ioc.component.autowiring;

import lombok.extern.log4j.Log4j;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

@Log4j
public class AutowiredTest {

    @Test
    public void testMethod() {
        ApplicationContext context = new AnnotationConfigApplicationContext(MainConfig.class);

        Boss boss = (Boss) context.getBean("customBoss");
        log.info(boss);
    }
}